package com.breakfast.fun.data.entity.user.address;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by yukai on 16/9/15.
 */
public class BuildingData {

    /**
     * id : 1377
     * builderName : 平安银行(福州金融街支行)
     * areaId : 12
     * areaName : 台江区-金融街万达
     * cityId : 1
     * cityName : 福州市
     * addTime : 2016-04-28 18:21:01
     * state : 0
     * mainCompany :
     * userNum : 0
     * companyNum : 0
     * sort : 0
     * address : 江滨中大道363号
     * lat :
     * lon :
     * expressId : 0
     * expressName :
     */

    private int id;
    private String builderName;
    private int areaId;
    private String areaName;
    private int cityId;
    private String cityName;
    private String addTime;
    private int state;
    private String mainCompany;
    private int userNum;
    private int companyNum;
    private int sort;
    private String address;
    private String lat;
    private String lon;
    private int expressId;
    private String expressName;

    public static BuildingData objectFromData(String str) {

        return new Gson().fromJson(str, BuildingData.class);
    }

    public static List<BuildingData> arrayBuildingDataFromData(String str) {

        Type listType = new TypeToken<ArrayList<BuildingData>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getBuilderName() {
        return builderName;
    }

    public void setBuilderName(String builderName) {
        this.builderName = builderName;
    }

    public int getAreaId() {
        return areaId;
    }

    public void setAreaId(int areaId) {
        this.areaId = areaId;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getMainCompany() {
        return mainCompany;
    }

    public void setMainCompany(String mainCompany) {
        this.mainCompany = mainCompany;
    }

    public int getUserNum() {
        return userNum;
    }

    public void setUserNum(int userNum) {
        this.userNum = userNum;
    }

    public int getCompanyNum() {
        return companyNum;
    }

    public void setCompanyNum(int companyNum) {
        this.companyNum = companyNum;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLat() {
        return lat;
    }

    public void setLat(String lat) {
        this.lat = lat;
    }

    public String getLon() {
        return lon;
    }

    public void setLon(String lon) {
        this.lon = lon;
    }

    public int getExpressId() {
        return expressId;
    }

    public void setExpressId(int expressId) {
        this.expressId = expressId;
    }

    public String getExpressName() {
        return expressName;
    }

    public void setExpressName(String expressName) {
        this.expressName = expressName;
    }

    @Override
    public String toString() {
        return "BuildingData{" +
                "builderName='" + builderName + '\'' +
                ", id=" + id +
                '}';
    }
}
